﻿using Camc.Quality.RecordTable.FormBase;
using Camc.Quality.RecordTable.FormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.RecordTable.FormEntity
{
    public class 进箱舱登记表 : TableBase
    {
        public 进箱舱登记表(int serialNum, Guid workStepEntityId, Guid processesEntityId, int sort, string model, string fisrtDrawingNum, string firstDrawingName)
        {
            SerialNum = serialNum;
            Sort = sort;
            WorkStepEntityId = workStepEntityId;
            ProcessesEntityId = processesEntityId;

            Model = model;
            FisrtDrawingNum = fisrtDrawingNum;
            FirstDrawingName = firstDrawingName;
        }
        public override string FormName { get; protected set; } = "进箱舱登记表";

        public override string Model_DisplayName { get; protected set; } = "型号";
        public override bool Model_Show { get; protected set; } = true;
        public override bool Model_Enable { get; protected set; } = true;
        public override int Model_Property { get; protected set; } = 2;

        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "图号";
        public override bool FisrtDrawingNum_Show { get; protected set; } = true;
        public override bool FisrtDrawingNum_Enable { get; protected set; } = true;
        public override int FisrtDrawingNum_Property { get; protected set; } = 2;

        public override string FirstDrawingName_DisplayName { get; protected set; } = "名称";
        public override bool FirstDrawingName_Show { get; protected set; } = true;
        public override bool FirstDrawingName_Enable { get; protected set; } = true;
        public override int FirstDrawingName_Property { get; protected set; } = 2;

        /// <summary>
        /// 记录要素
        /// </summary>
        /// <param name="recordStatus"></param>
        /// <param name="remark"></param>
        /// <param name="recordRequire"></param>
        /// <param name="recordMainopoint"></param>
        public RecordRequirementsEntity SetRecordRequirements(RecordRequirementsEntity entity,string recordStatus, string remark,string recordRequire, string recordMainopoint)
        {
            entity.SetRecordStatus(recordStatus, "工作事项", true, true, 0);
            entity.SetRecordRequire(recordRequire, "进箱携带物品", true, true, 0);
            entity.SetRecordMainopoint(recordMainopoint, "携带物品数量", true, true, 0);
            entity.SetRemarks(remark, "进箱时间", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 出箱确认
        /// </summary>
        /// <param name="confirmResult"></param>
        public MeasuredResultEntity SetMeasuredResult(MeasuredResultEntity entity,string confirmResult)
        {
            entity.SetConfirmResult(confirmResult, "出箱确认", true, true, 0);
            return entity;
        }
        /// <summary>
        /// 互检
        /// </summary>
        public InspectionSignatureEntity SetInspectionSignature(InspectionSignatureEntity entity)
        {
            entity.InspectionSignatureName = "互检";
            entity.SetFirstOperator(null, "操作者", true, true, 0, null, "操作者操作时间", true, true, 0);
            entity.SetSecondOperator(null, "互检者", true, true, 0, null, "互检者操作时间", true, true, 0);
            return entity;
        }
    }
}
